import cPickle
class EnglishWords:
	wordlist = None
	def __init__(self,file):
		f = open(file,"r")
		self.wordlist = set(cPickle.load(f))
	def isEnglishWord(self, word):
		return (word in self.wordlist)
if __name__=="__main__":
	e = EnglishWords("dat/new.english.words.list")
	print e.wordlist